package com.java.al.math;

public class Sum {
	
	public void aaa(){
		System.out.println("我是aaa");
	}
	public static void main(String[] args) {
		int sum = 1;
		int all = 0;
		System.out.println( sum );
		for (int i = 1; i < 10; i++) {
			int old = sum;
			sum = sum*10 +i+1;
			all += sum;
			//输出 1，12，123，1234，12345……
			System.out.println(sum);
			//输出 1+12+123+1234+12345……
			System.out.println("原有"+old+"*新的"+sum+""+"和："+all);
		}
	}
}
